from rest_framework.response import Response

class RespBean:
    @staticmethod
    def success(message, data=None):
        return Response({
            "code": 200,
            "message": message,
            "data": data
        })

    @staticmethod
    def error(message, data=None):
        return Response({
            "code": 500,
            "message": message,
            "data": data
        }, status=500)

    @staticmethod
    def not_found(message):
        return Response({
            "code": 404,
            "message": message
        }, status=404)
